home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Science / Diffraction 2.02 / Diffraction 2.02.rsrc / TEXT_128.txt < prev    next >
Text File  |  1994-02-23  |  13KB  |  169 lines

  1. Introduction
  2.  
  3.      Diffraction was written so that students could interact with the phenomenon of diffraction and thereby come to understand it.  The aperture and all the relevant physical parameters are very easy to change, so the student can easily answer the ‚ÄúAh!  But what if...?‚Äù question.  This is, of course, exactly what is needed if one is to reach to a true understanding of the subject.
  4.  
  5. Basic Operation
  6.  
  7.      The ‚ÄúA‚Äù window is the Aperture window.  This is where you draw the diffraction aperture that you are going to investigate.  Each pixel in the window can have its own amplitude and phase.  Simply change the pen settings (see Drawing menu below) before drawing the pixel.
  8.      The ‚ÄúS‚Äù window is the Screen window.  It displays the diffraction pattern produced by the aperture.
  9.        The relative intensities are indicated by 16 levels of gray.  White indicates the brightest spots.
  10.      Notice that the name of the file that you are currently working with is displayed in the title of both of these windows.
  11.  
  12.      The Pixel Data window displays the amplitude and phase of the last pixel that you clicked on in either the Aperture or the Screen window.  You must be in Examine mode in order to do this. (see Drawing menu below)
  13.  
  14.      When you use the zoom feature on the Drawing menu, the program displays a Zoom window that shows an enlarged view of part of the Aperture window.  You can draw in this window just the way you do in the Aperture window except that you cannot draw objects.  (see Drawing menu below)
  15.  
  16.      Each of the three main windows (Aperture, Screen, Zoom) has its own drawing mode that you select from the Drawing menu.  In the Aperture and Screen windows, the cursor will always be a cross because this is the only way to work with small details.  In the Zoom window, the cursor will correspond to whatever is drawn next to the corresponding item on the Drawing menu.
  17.  
  18. Advanced features
  19.  
  20.      The program allows you to transform the contents of the Screen and Aperture windows to bring out faint details.  If you think of the window contents as a photograph, the overexposure factor corresponds to leaving the camera shutter open for a longer time interval.  The human eye has a logarithmic response to intensity and has a range of about 3 orders of magnitude.  The ‚ÄúDraw as log10(Intensity)‚Äù option draws the window contents as it would be seen by the human eye.
  21.  
  22.      You can choose which window should be considered the Aperture window.  Use the ‚ÄúAperture <-> Screen‚Äù item on the Calculation menu to switch windows.  This allows you to simulate spatial filtering by re-drawing the initial diffraction pattern and then transforming it.  The password is required to use this feature.
  23.  
  24.      When you are calculating the initial Far-field diffraction pattern (see Theory section below), use the Forward option.  Use the Backward option to simulate a spatial filtering transformation.
  25.  
  26. Theory
  27.  
  28.      Huygens principle of infinitesimal radiators underlies all of the program‚Äôs calculations.  In simple terms, this means that, for each point on the screen, the program adds up the contribution from each part of the aperture to get the resulting electric field.  The intensity is the square of the magnitude of the electric field.  The fancy way of saying it is that the program calculates the Fourier Integral over the aperture for each point on the screen.
  29.      Each pixel in the aperture corresponds to one infinitesimal radiator which contributes one component (phasor) to the overall electric field vector at the screen.
  30.      The Fresnel Approximation is a faster way of calculating the Fourier Integral which is valid when the screen is not too close to the aperture. The Far Field Approximation produces a normalized approximation that is valid when the screen is very far away from the aperture.
  31.  
  32. The File Menu
  33.  
  34.      New setup
  35.           Clears the aperture and the diffraction pattern so you can create a new system.
  36.  
  37.      Open setup
  38.           Allows you to load in a setup that you created and saved earlier.
  39.  
  40.      Save setup     (password required)
  41.           Saves the current aperture, screen, and parameters.
  42.  
  43.      Save setup as...     (password required)
  44.           Lets you give the setup a new name before saving it.
  45.  
  46.      Revert to saved
  47.           Loads in the last saved version of the setup.  (if there is one)
  48. -----
  49.      Save window picture
  50.           Saves the contents of the active window as a PICT file.  This item is only active if the Aperture or Screen window is active.
  51. -----
  52.      Page Setup...
  53.           Allows you to change the page format for your printer.
  54.  
  55.      Print window
  56.           Prints the contents of the active window.  This item is only active if the Aperture or Screen window is active.  To get good results, set your laser printer to grayscale mode.  If there is no such option, save the diffraction pattern and print it with GifConverter.  (see Registration section below)
  57. -----
  58.      Quit
  59.           Exits the program.
  60.  
  61. The Edit Menu
  62.  
  63.      Undo
  64.           Reverts the aperture to what it was before the last drawing operation.  Selecting Undo a second time re-does the last drawing operation.
  65.  
  66.      The rest of the menu items do nothing in this program.
  67.  
  68. The Aperture Menu
  69.  
  70.      Draw
  71.           Sets the Aperture window to drawing mode so you can draw individual pixels in the aperture.
  72.  
  73.      Fill
  74.           Sets the Aperture window to filling mode.  When you now draw pixels in the aperture, the program will fill the area enclosed by the sweeps of your pen with the same amplitude and phase.
  75.  
  76.     Examine
  77.           Sets the Aperture window to examine mode so you can see the values of the aperture pixels by clicking on them.  The values are displayed in the Pixel Data window
  78.  
  79.      Set pen
  80.           When you click on a pixel in the Aperture window, the pen will be set to the amplitude and phase of that pixel.
  81.  
  82.      Zoom
  83.           Click and drag in the Aperture window.  The pixels within the resulting rectangle will be enlarged and displayed in the Zoom window.
  84. -----
  85.      Pen settings
  86.           When an aperture pixel is drawn, its amplitude and phase are set to the values that you specify in this dialog window.
  87. -----
  88.      Line
  89.           Click and drag in the Aperture window draws a line.
  90.  
  91.      Rectangle
  92.           Click and drag in the Aperture window draws a rectangle.
  93.  
  94.      Oval
  95.           Click and drag in the Aperture window draws an oval.
  96.  
  97.      N-gon
  98.           Click and drag in the Aperture window draws a regular polygon.  The point that you initially click on is used as the center of the polygon.
  99. -----
  100.      Object settings
  101.           Filled -- If this is checked, the rectangles, ovals, and n-gons that you draw will be filled in.
  102.           Rect & Oval rotation... -- Allows you to specify the angle of rotation of the rectangles and ovals that you draw.  Positive angles rotate the objects counterclockwise around their centers.
  103.           N-gon sides... -- Allows you to specify how many sides the n-gons should have.
  104.           -----
  105.           Initial point is corner -- If this is checked, the point that you initially click on to start drawing an object will be used as one corner of the object.  This is used for lines, rectangles, and ovals.
  106.           Initial point is center -- If this is checked, the point that you initially click on to start drawing an object will be used as the center of the object.  This is used for lines, rectangles, and ovals.
  107. -----
  108.      Hide zoom window
  109.           Hides the Zoom window.  This item will only be active if the Zoom window is visible.
  110.  
  111. The Calculation Menu
  112.  
  113.      Aperture <-> Screen     (password required)
  114.           Switches the Aperture and Screen windows.  This is very useful if you want to simulate spatial filtering by removing parts of the diffraction pattern and observing what happens to the original aperture.
  115. -----
  116.      Change parameters
  117.           Lets you change all the relevant physical parameters of the diffraction system:  the radiation wavelength, the size of and distance to the screen, the size of each pixel in the aperture, and the X and Y subdivisions of each aperture pixel.
  118.           Most of the values are obvious.  The X and Y subdivisions allow you to cut each aperture pixel into smaller radiators.  This allows you to get higher accuracy from the program without having to draw a larger picture of the aperture and reduce the physical size of each pixel.
  119.           The radiation wavelength, the size of aperture pixels, and the distance to the screen are needed for both the exact calculations and the Fresnel Approximation.  The rest of the data are only used in the exact calculations.
  120. -----
  121.      Exact Result     (password required)
  122.           Set window size -- Allows you to set the exact size of the Diffraction Pattern window so that you can get the aspect ratio to match that of the physical screen (as specified in the Change parameters dialog window, see above).
  123.           Infer screen size -- By telling the program how wide the aperture is in the x and y directions, and telling it how many fringes you want to see of the diffraction pattern, the program will calculate the approximate screen size in meters and set the screen size (from the Change parameters dialog window) accordingly.
  124.           -----
  125.           Calculate now -- Start calculating the exact diffraction pattern using the current aperture and physical parameters.  Since this can take a very long time, the program displays a dialog window with a Stop button and a progress indicator.  This is technically faster than the background run because 100% of the computer's time is spent on calculating.  Pressing the Stop button will force the program to stop calculating as soon as it can.  You may still have to wait a while, however.
  126.           Start background calc -- Start calculating the exact diffraction pattern using the current aperture and physical parameters.  In this case, the program does the calculations in the background.  Since the calculations usually take a very long time, you can go off and run other programs while Diffraction is calculating.  The Screen window is updated as the points are calculated.
  127.  
  128.      Fresnel approx     (password required)
  129.          RIGO -- Reasonable In, Garbage Out
  130.  
  131.      Far-field approx
  132.           Calculates the far-field approximation to the diffraction pattern.  This is done by taking the Fast Fourier Transform (FFT) of the aperture.  This usually doesn‚Äôt take more than about 1 minute.  The results are normalized, so the physical parameters (see Change parameters menu item above) are not relevant to the results.
  133.           Forward -- Calculates the FFT.  Use this when you are calculating the initial results from an aperture.
  134.           Backward -- Calculates the inverse FFT.  Use this when you are calculating the results from a spatially filtered diffraction pattern.
  135. -----
  136.      Transform
  137.           Allows you to set the overexposure factor for the active window.  This menu item will only be active if either the Aperture or the Screen window is active.
  138.  
  139.  
  140. The Legal Stuff
  141.  
  142.      It was an immense task to get the program to work from scratch, so if you got this program without paying me for it, please pay for it if you plan to use it.  The price is US$25 for a single copy and is negotiable for a sitewide school license.  When I receive your payment, I will make you a registered user (so that you will be notified of significant new versions) and send you a copy of the latest version of the program if you need it.
  143.      Some of this program's features are protected by a password.  This was done to encourage you to send in your shareware fee.  The menu item ‚ÄòEnter Password‚Äô allows you to enter the password and unlock the protected features.  When you pay me, send me a note telling me what the Phrase given in the Enter Password dialog is, and I will send you the correct password.
  144.      Once you enter the password, the program will save it so that you do not need to do it again.  Please remove the password from the copies you give to your friends.
  145.      I'll be happy to send you a list of my other programs if you want me to.  I also do custom programming, in case you need a program that will do something special.
  146.  
  147.      My address is:
  148.  
  149.      John Lindal
  150.      P.O. Box 4092
  151.      Point Dume, CA  90264
  152.  
  153.      My E-mail address is:
  154.  
  155.      jafl@alice.wonderland.caltech.edu
  156.  
  157.      The GifConverter program that you can use to print the diffraction patterns is a shareware program that can be obtained from EduCorp, the sumex-aim.stanford.edu ftp site, and many other sources.
  158.  
  159. Future Versions
  160.  
  161.      If you have any suggestions for improving this program, please let me know.  The program was, after all, written to help you teach students about diffraction.
  162.  
  163. Disclaimer
  164.  
  165.      I have tried to debug this program on all the common Macs II‚Äôs.  However, I can't guarantee that it will work with all systems.  If the program does crash, send me a letter telling me how it happened (error messages and numbers are very useful!), and I'll try to fix the problem.
  166.  
  167. Bugs Fixed from Previous Versions
  168.  
  169. 1)  The folks at mac.archive.umich.edu pointed out that, since Diffraction requires color, it should check for this and quit gracefully rather than just crashing the computer.